package cn.tedu.ivos2;

/**
 * @author 边拾柱
 * @date 2025/1/4 19:50
 */
public class Main {
    public static void main(String[] args) {

    }
    public int strStr(String haystack, String needle) {
        int l = 0, r = needle.length() - 1;
        while (r < haystack.length()) {
            if (haystack.substring(l, r + 1).equals(needle)) return l;
            l++;
            r++;
        }
        return -1;
    }
}
